import log1py from "proj4/lib/common/log1py";

export function dict(dictionary,filterStr,layername) {
    let getStr = String(filterStr)
    let returnVal = ''
    const dicAry = dictionary
    if (!getStr.includes(',')) {
        if(dicAry.length>0){
            dicAry.forEach(item => {
                if (getStr === item.enname && layername==item.chsourcelayer) {
                    returnVal = item.chname
                }else{
                    if(returnVal==''){
                        returnVal=getStr
                    }
                }



            })
        }else {
            returnVal=getStr
        }

    }
    return returnVal
}
